const express = require('express');
const router = express.Router();

const userController = require('../../controller/user')

const { borrowValidate } = require('../validator/user')

// 查询数据库
router.get('/get', userController.query)

// 借阅图书
router.post('/borrow', borrowValidate, userController.borrow)

// 借阅记录查询
router.get('/queryBorrow', userController.queryBorrow)

// 信息反馈
router.post('/infoFeedback', userController.infoFeedback)

// 更改用户信息
router.post('/changeUserInfo', userController.changeUserInfo)

// 获取公告信息
router.get('/getPublicInfo', userController.getPublicInfo)

module.exports = router